<template>
	<view>
		<view class="people" @click="NPopuShowFun">
			<image src="../../static/nav/Group.png" class="people-icon" mode=""></image>
			<text class="people-text">{{dinersNumber}}</text>
			<image class="Vector" src="../../static/nav/Vector.png" mode=""></image>
		</view>
	</view>
</template>

<script>
	export default {
		name: "NumberOfPeople",
		data() {
			return {
				dinersNumber:uni.getStorageSync('dinersNumber')
			};
		},
	
		mounted(){
			// 更新用餐人数
			this.bus.$on('NumberPeoplePopuRenew',(i)=>{
				this.dinersNumber = i
			})
		},
		methods:{
			NPopuShowFun(){
				this.bus.$emit('NumberPeoplePopuShowFun')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.people {
		padding: 8px 10px;
		display: flex;
		border-radius: 10px;
		align-items: center;
		background-color: $qy-bg-nav-option-color;
		margin-left: 62px;
		.people-icon {
			width: 17.3px;
			height: 16.2px;
		}

		.people-text {
			color: $qy-text-color-title;
			margin-left: 8px;
			font-size: 14px;
		}
		.Vector {
			width: 9.33px;
			height: 9.33px;
			margin-left: 8px;

		}
	}
</style>